//
//  MKBottomDownloadView.m
//  ManKeCartoon
//
//  Created by 邹功梁 on 15/10/27.
//  Copyright © 2015年 ManKe. All rights reserved.
//

#import "MKBottomDownloadView.h"
#import "MKBaseHeader.h"
@implementation MKBottomDownloadView

- (instancetype)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {
        
        _topLineView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, SCREEN_WIDTH, 1)];
        [_topLineView setBackgroundColor:[UIColor colorWithRed:0.87 green:0.87 blue:0.87 alpha:1]];
        
        _vertcialLineView = [[UIView alloc] initWithFrame:CGRectMake(SCREEN_WIDTH / 2 - .5, 0, 1, frame.size.height)];
        [_vertcialLineView setBackgroundColor:[UIColor colorWithRed:0.87 green:0.87 blue:0.87 alpha:1]];
        
        _allButton = [UIButton buttonWithType:UIButtonTypeCustom];
        [_allButton setFrame:CGRectMake(0, 10 * HEIGHT, SCREEN_WIDTH / 2, 20 * HEIGHT)];
        _allButton.adjustsImageWhenHighlighted = NO;
        _allButton.titleLabel.textAlignment = NSTextAlignmentCenter;
        [_allButton setTitle:@"全选" forState:UIControlStateNormal];
        [_allButton setTitle:@"取消全选" forState:UIControlStateSelected];
        [_allButton setTitleColor:[UIColor lightGrayColor] forState:UIControlStateNormal];
        [_allButton setTitleColor:[UIColor colorWithRed:0.49 green:0.76 blue:0.55 alpha:1] forState:UIControlStateSelected];
        
        _button = [UIButton buttonWithType:UIButtonTypeCustom];
        [_button setFrame:CGRectMake(SCREEN_WIDTH / 2, 10 * HEIGHT, SCREEN_WIDTH / 2, 20 * HEIGHT)];
        _button.adjustsImageWhenHighlighted = NO;
        _button.titleLabel.textAlignment = NSTextAlignmentCenter;
        [_button setTitle:@"下载" forState:UIControlStateNormal];
        [_button setTitle:@"下载" forState:UIControlStateSelected];
        [_button setTitleColor:[UIColor orangeColor] forState:UIControlStateNormal];
        [_button setTitleColor:[UIColor lightGrayColor] forState:UIControlStateSelected];
        
        [self addSubview:_topLineView];
        [self addSubview:_vertcialLineView];
        [self addSubview:_allButton];
        [self addSubview:_button];
    }
    return self;
}

/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
    // Drawing code
}
*/

@end
